<?php
class Profile extends AppModel {
    
    var $name = 'Profile';
    var $belongsTo = 'User';
#    var $actsAs = array('Multivalidatable');

    
    var $validate = array(
        'creditcard' => array(
            'notEmpty' => array(
                'rule' => 'numeric',
                'message' => 'Your credit card must be number',
                'required' => true,
            )
        ),
        'contact' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Your contact must not be empty',
                'required' => true,
            )
        ),
        'name' => array(
            'notEmpty' => array(
                'rule' => array('minLength',5),
                'message' => 'Your name must be at least 5 characters long',
                'required' => true,
            )
        ),
        'email' => array(
            'email' => array(
                'rule' => 'email',
                'message' => 'Please enter your email',
                'last' => true,
                'required' => true
            )
        )
    );

}
?>
